<!DOCTYPE >
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>单页列表</title>


<link rel="stylesheet" type="text/css" href="/system/css/right.css">
<script type="text/javascript" src="/system/js/jquery.js"></script>
<script type="text/javascript" src="/system/js/system.js"></script>
<script type="text/javascript" src="/system/js/admin.js"></script>
</head>
<body style="overflow: auto;">
	<div class="basic bor">
			<div class="title fl">当前位置：单页管理 > 单页列表</div>
	</div>

	<form action="{:url('Page/addclass')}" method="post">
     <div class="addnav">
			<span class="navname">单页名称 ：</span>
        <input class="input127 input190" placeholder="商户名称" name="name" type="text">

						<style>
						.addnews{
						    margin-right:10px;
						}
						.top0{
						    margin-top: 0;
						    margin-left:10px;
						    text-align: center;
						    color: #fff!important;
						}
						</style>
						<span class="navname">选择分类 ：</span>
						<select name="uid" id="uid">
									<option value="0">顶级分类</option>
									{volist name="listclass" id="li"}
									<option value="{$li.id}">{$li.html}{$li.name}</option>
									{/volist}

						</select>

        <input class="submit addnew" name="submit" type="submit" value="提交">


  </div>
  </form>

<!-- 文章分类列表 -->
<div class="catelist">
    <div class="lists listsov">
    <dd>单页列表</dd>

    </div>

</div>
<!-- /文章分类列表 -->

<table border="1"  class="table table-hover text-center" id='list'>
  <tr class="trcolor">
    <td>ID</td>
   	<td>单页名称</td>
    <!-- <td>更改分类</td> -->
    <td colspan="1">操作</td>
  </tr>


<!-- ============================================================= -->

    <tr>
		{volist name="listclass" id="li" key="k"}
			<td>{$k}</td>
	   	<td style="  text-align: left; padding-left: 10px;">{$li.html} <input type="text" onchange="retum_conds('{$li.id}')" name_id="{$li.id}" value="{$li.name}"> </td>
    	<td><a href="{:url('Page/delcalss',['id'=>$li.id])}" onclick="return confirm('确定将此记录删除?')" class="current">删除</a></td>
    </tr>
		{/volist}

		<script type="text/javascript">
			//异步更改分类
		    function retum_conds(id){

		    var name =$('[name_id='+id+']').val()
				$.ajax({
							 type:'post',
							 url:'{:url("Page/upcalss")}',
							 data:{id:id,name:name},
							 cache:false,
							 dataType:'json',
							 success:function(data){
								alert(data.ok);

							 }

		    })


			}

		</script>

<!-- ============================================================= -->

</table>
<div class="pages">

</div>

<!-- 提示 -->
<p class="ts"><span class="colorf00">*</span><span class="ts_text"> 请直接点击文字修改。</span></p>
</body>

</html>
